import axios from 'axios'

// 获取游戏列表
const gameList = () => {
  return axios.get(`${import.meta.env.VITE_APP_API_URL}/game_goods_list`)
}

// 预约列表
const gameBookList = (params:{}) => {
  return axios.get(`${import.meta.env.VITE_APP_API_URL}/game_book_list`,{params:params})
}

// 预约列表
const bookList = (params:{}) => {
  return axios.get(`${import.meta.env.VITE_APP_API_URL}/book_list`,{params:params})
}

// 提交预约
const confirmBook = (params:{}) => {
  return axios.post(`${import.meta.env.VITE_APP_API_URL}/confirm_book`,params)
}

// 检查优惠券状态
const checkCoupon = (params:{}) => {
  return axios.get(`${import.meta.env.VITE_APP_API_URL}/check_coupon`,{params:params})
}

// 获取准备订单数据
const readyOrder = (params:{}) => {
  return axios.post(`${import.meta.env.VITE_APP_API_URL}/ready_order`,params)
}


export { gameBookList, gameList, bookList, confirmBook, checkCoupon, readyOrder }